﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jage.Utils;

namespace Radar.Navigation
{
    internal class NavZoneFactory
        : SingletonBase<NavZoneFactory>
    {

        public NavZone[] CreateNavZones(IEnumerable<NavZoneDefinition> definitions)
        {
            List<NavZone> navZones = new List<NavZone>();
            foreach (NavZoneDefinition definition in definitions)
            {
                navZones.Add(CreateNavZone(definition));
            }
            return navZones.ToArray();
        }

        public NavZone CreateNavZone(NavZoneDefinition definition)
        {
            return new NavZone(definition.Left, definition.Top, definition.Right, definition.Bottom);
        }
        
    }
}
